function requestStudent() {
  function request(url) {
    return fetch(url, {
      method: "get",
    }).then((res) => {
      return res.data;
    });
  }

  let requestArr = new Array(6).fill(request(url));
  let result = [];
  function post(requestArr) {
    Promise.allSettled(requestArr).then((res) => {
      //进入then则表示全部状态以改变,六个请求完成
      let newres = res.filter((item) => {
        return item.status !== "rejected";
      });
      //过滤满足条件的学生
      let itemArr = newres.filter((item) => {
        return (
          item.score > 90 && Date.parse(item.time) > Date.parse("2021-12-03")
        );
      });
      itemArr.map((item) => {
        //满足条件再塞入result
        if (result.length < 100) {
          result.push(item);
        } else {
          return;
        }
      });
      if (result.length < 100) {
        //学生不够再次调用
        post(requestArr);
      } else {
        return;
      }
    });
  }
  post(requestArr);
}
